package com.one.service;



import java.util.List;
import java.util.Map;

/**
 * Create on 2022-01-19
 * <p>
 * Author: LiangWei
 * <p>
 * Description:
 **/
public interface WechatPayService {
    /**
     *@author : LiangWei
     *@date : 2022-01-04 14:16
     *@return :
     *@description : 生成统一下单接口参数
     */
    String wechatPayUnifiedOrderParamsXml(Integer userId,String token,String orderNo,Integer consigneeId,Integer totalFee,Integer ticketId) throws Exception;
    /**
     *@author : LiangWei
     *@date : 2022-01-04 15:54
     *@return :
     *@description : 请求微信官方，统一下单
     */
    Map<String,String> wechatPayUnifiedOrder(String unifiedOrderParamsXml) throws Exception;
    /**
     *@author : LiangWei
     *@date : 2022-01-04 15:54
     *@return :
     *@description : 解析微信支付异步回调结果，并返回响应通知结果
     */
    String wechatPayUnifiedNotifyResole(String unifiedNotifyResultXml) throws Exception;
    /**
     *@author : LiangWei
     *@date : 2022-01-19 15:49
     *@return :
     *@description : 判断订单是否都是待支付状态（数据库判断）
     */
    boolean judgeOrderWaitPay(String orderNo);
    /**
     *@author : LiangWei
     *@date : 2022-01-22 09:38
     *@return :
     *@description : 判断用户优惠卷是否符合满减需求
     */
    boolean judgeTicketFull(String orderNo,Integer ticketId);

    /**
     *@author : LiangWei
     *@date : 2022-01-22 09:38
     *@return :
     *@description : 计算实际支付金额
     */
    Integer getTruePrice(String orderNo,Integer ticketId);
}
